package com.course.web.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Min;

/**
 * Created by Justin on 2017/6/3.
 */
@Data
@EqualsAndHashCode(of = {"studentId"})
public class StudentVM implements HasID {
    @Min(0)
    private int studentId;
    @Min(0)
    private int accountId;
    @NotEmpty
    private String username;
    @NotEmpty
    private String password;
    @NotEmpty
    private String name;
    @NotEmpty
    private String link;
    @NotEmpty
    private String audio;
    @NotEmpty
    private String intro;
    @Min(0)
    private int courseId;
    @Min(0)
    private int score;
    @Min(0)
    private int exchange;

    @Override
    public int getId() {
        return studentId;
    }
}
